<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:ths="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <link rel="icon" type="image/png" th:href="@{/static/image/icon.ico}"/>
    <script th:src="@{/static/js/jquery-2.1.4.min.js}"></script>
    <script th:inline="javascript">
 $(function(){
	//左侧栏样式
	var href=window.location.pathname;
	$(".layui-nav-tree .layui-nav-child dd").each(function(){
		var currentHref=$(this).children().attr("href");
		if(href.indexOf(currentHref)==0){
			$(this).parent().parent().attr("class","layui-nav-item layui-nav-itemed");
			$(this).addClass("layui-this");
		}
	 });
	var unRead=[[${session.unRead}]];
	if(unRead!=0){
		$("#count").text(unRead);
		$("#read").attr("class","layui-badge-dot");
	}
	//点击文字跳转主页
	$("#toIndex").click(function(){
		window.location.href="/user/index.html";
	})
 });
 </script>
</head>
<body>
<div class="layui-header">
    <div class="layui-logo" id="toIndex" style="cursor:pointer;">博客后台管理系统</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item">
            <a href="/user/sysChat.html">
                <i class="layui-icon layui-icon-notice"></i>
                &nbsp;通知 <span id="count"></span>
                <span class="" id="read"></span>
            </a>
        </li>
        <li class="layui-nav-item">
            <a>
                <i class="layui-icon layui-icon-user"></i>
                &nbsp;在线人数 <span id="onlineCount">1</span>
                <span class="" ></span>
            </a>
        </li>
        <li class="layui-nav-item">
            <a style="cursor:pointer;">
                <img th:src="${session.userSession}" class="layui-nav-img">
                [[${session.userSessionKey}]]
            </a>
            <dl class="layui-nav-child">
                <dd><a href="/user/sysUserInfo.html">基本资料</a></dd>
                <dd><a href="/user/sysUserLog.html">安全设置</a></dd>
            </dl>
        </li>
        <li class="layui-nav-item"><a href="/user/logout.html">退了</a></li>
    </ul>
</div>

<div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree"  lay-filter="test">
            <!--自定义thymeleaf标签，后台查询栏目 缓存获取  -->
            <ths:eachs></ths:eachs>
        </ul>
    </div>
</div>
<div class="layui-footer">
    <!-- 底部固定区域 -->
    继续努力
</div>
</body>
</html>
